# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=merkuro
pkgver=23.08.4
pkgrel=0
pkgdesc="A calendar application using Akonadi to sync with external services (NextCloud, GMail, ...)"
# armhf blocked by qt5-qtdeclarative
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> akonadi
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://invent.kde.org/pim/kalendar"
license="GPL-3.0-or-later AND BSD-2-Clause"
depends="
	kdepim-runtime
	kirigami-addons
	kirigami2
	qt5-qtlocation
	"
makedepends="
	akonadi-contacts-dev
	akonadi-dev
	eventviews-dev
	extra-cmake-modules
	kcalendarcore5-dev
	kconfigwidgets5-dev
	kcontacts5-dev
	kcoreaddons5-dev
	ki18n5-dev
	kirigami-addons-dev
	kirigami2-dev
	kitemmodels5-dev
	kpackage5-dev
	kpeople5-dev
	kwindowsystem5-dev
	mailcommon-dev
	qqc2-desktop-style5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtlocation-dev
	qt5-qtquickcontrols2-dev
	qt5-qtsvg-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/pim/merkuro.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/merkuro-$pkgver.tar.xz"
options="!check" # No tests

provides="kalendar=$pkgver-r$pkgrel"
replaces="kalendar"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
efa4fd461dff049799412578b4b29999987fb81c10b4a5b8e3404e5d488be386936daf41ce9fd43e9c57c98eb00a3a6e2ea60d02e9e08df5305d61f17a9efbec  merkuro-23.08.4.tar.xz
"
